package com.home.service;

import org.springframework.dao.DataAccessException;

import com.home.entity.User;

public interface UserService {

	/**
	 * 添加用户
	 * @param user
	 * @return
	 */
	public int addUser(User user);
	
	/**
	 * 查询用户
	 * @param username
	 * @param passsord
	 * @return
	 */
	public User findUserByNameAndPassword(String username,String passsord);
	
	/**
     * 通过邮箱 或者用户名登陆
     * @param user
     * @return
     * @throws DataAccessException
     */
    public User findUserByUser(User user) throws DataAccessException;
    
   
	
}
